cmake_minimum_required(VERSION 3.15.3)
project(hup_utils_parent_cpp)

set(CMAKE_CXX_STANDARD 14)

INCLUDE_DIRECTORIES(src/main/resources/include)
#引入jni,$ENV{JAVA_HOME}是取系统环境变量的[JAVA_HOME]字段
INCLUDE_DIRECTORIES($ENV{JAVA_HOME}/include $ENV{JAVA_HOME}/include/win32)
LINK_DIRECTORIES(src/main/resources/lib)

SET(HRobotModule
        src/main/cpp/hardware/BatteryUtil.cpp
        src/main/cpp/hardware/MouseUtil.cpp
        src/main/cpp/hardware/VolumeUtil.cpp
        src/main/cpp/common/ShellExecuteUtil.cpp
        src/main/cpp/common/CharsetConverter.cpp
        )

#生成dll
#jni
ADD_LIBRARY(HRobotJni SHARED
        src/main/cpp/dllJni/HRobotJni.cpp
        ${HRobotModule}
        )

#生成exe
ADD_EXECUTABLE(HRobotJniTest
        src/main/cpp/test/HRobotTest.cpp
        src/main/cpp/common/CommonUtil.cpp
        ${HRobotModule}
        )

ADD_EXECUTABLE(CommonTest
        src/main/cpp/test/CommonTest.cpp
        src/main/cpp/common/CommonUtil.cpp
        ${HRobotModule}
        )

ADD_EXECUTABLE(AttachWindowTest
        src/main/cpp/test/AttachWindowTest.cpp
        )